Skip to content

feat: build: automate agent config JSON schema generation from proto+…#58

Open
jjleng wants to merge 1 commit intomainfrom
harden-graph-schema-gen
Open

feat: build: automate agent config JSON schema generation from proto+…#58
jjleng wants to merge 1 commit intomainfrom
harden-graph-schema-gen

Conversation

@jjleng
Copy link
Copy Markdown
Contributor

@jjleng jjleng commented Apr 17, 2026

…pydantic

@jjleng jjleng requested a review from dngpng April 17, 2026 22:45
Copy link
Copy Markdown
Contributor

@dngpng dngpng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick note on schema versioning ($schema) strictness:

The generated v3 schema currently treats $schema as a generic string (with a default) instead of enforcing an exact value.

Why this matters:

  • It weakens schema-level version gating, since validators can accept payloads with mismatched/incorrect $schema values.
  • Version routing then depends only on app code checks, not the schema contract itself.

Suggestion:

  • In agent-config-v3.schema.json, enforce an exact value for $schema (e.g. const: "https://feros.ai/schemas/agent-config-v3.schema.json").
  • When v4 is introduced, add a separate v4 schema file with its own exact value.
  • Import can still support multiple versions explicitly (e.g., route by $schema and validate against the matching schema, or use a oneOf wrapper).

This preserves strict contracts per version without blocking future schema evolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants